<?php
header('content-type:text/html;charset=utf-8');
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Ajax图像上传</title>
		<script type="text/javascript">
//Javascript Document
function uploadimg(form){
	form.submit();
}
	</script>
</head>
<body>
<center>
<div id="show"></div>
<form name="form" action="upload.php" method="post" enctype="multipart/form-data" target="uploadframe" onSubmit="uploadimg(this)">
	请选择上传的图像 ：
	<input type="file" name="myfile">
	<input type="submit" name="sub" value="提交">
<iframe id="uploadframe" name="uploadframe" src="upload.php" style="display:none"></iframe>
</form>
</center>
</body>
</html>